home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / c / gcc261ud-c.lha / gnu / os-include / inline / rexxsyslib.h < prev    next >
C/C++ Source or Header  |  1994-09-22  |  4KB  |  159 lines

  1. #ifndef _INLINE_REXXSYSLIB_H
  2. #define _INLINE_REXXSYSLIB_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL
  11. #define BASE_EXT_DECL0 extern struct Library * RexxSysBase;
  12. #endif
  13. #ifndef BASE_PAR_DECL
  14. #define BASE_PAR_DECL
  15. #define BASE_PAR_DECL0 void
  16. #endif
  17. #ifndef BASE_NAME
  18. #define BASE_NAME RexxSysBase
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern __inline void 
  24. ClearRexxMsg (BASE_PAR_DECL struct RexxMsg *msgptr,unsigned long count)
  25. {
  26.   BASE_EXT_DECL
  27.   register struct Library *a6 __asm("a6") = BASE_NAME;
  28.   register struct RexxMsg *a0 __asm("a0") = msgptr;
  29.   register unsigned long d0 __asm("d0") = count;
  30.   __asm __volatile ("jsr a6@(-0x9c)"
  31.   : /* no output */
  32.   : "r" (a6), "r" (a0), "r" (d0)
  33.   : "a0","a1","d0","d1", "memory");
  34. }
  35. extern __inline UBYTE *
  36. CreateArgstring (BASE_PAR_DECL UBYTE *string,unsigned long length)
  37. {
  38.   BASE_EXT_DECL
  39.   register UBYTE * _res  __asm("d0");
  40.   register struct Library *a6 __asm("a6") = BASE_NAME;
  41.   register UBYTE *a0 __asm("a0") = string;
  42.   register unsigned long d0 __asm("d0") = length;
  43.   __asm __volatile ("jsr a6@(-0x7e)"
  44.   : "=r" (_res)
  45.   : "r" (a6), "r" (a0), "r" (d0)
  46.   : "a0","a1","d0","d1", "memory");
  47.   return _res;
  48. }
  49. extern __inline struct RexxMsg *
  50. CreateRexxMsg (BASE_PAR_DECL struct MsgPort *port,UBYTE *extension,UBYTE *host)
  51. {
  52.   BASE_EXT_DECL
  53.   register struct RexxMsg * _res  __asm("d0");
  54.   register struct Library *a6 __asm("a6") = BASE_NAME;
  55.   register struct MsgPort *a0 __asm("a0") = port;
  56.   register UBYTE *a1 __asm("a1") = extension;
  57.   register UBYTE *d0 __asm("d0") = host;
  58.   __asm __volatile ("jsr a6@(-0x90)"
  59.   : "=r" (_res)
  60.   : "r" (a6), "r" (a0), "r" (a1), "r" (d0)
  61.   : "a0","a1","d0","d1", "memory");
  62.   return _res;
  63. }
  64. extern __inline void 
  65. DeleteArgstring (BASE_PAR_DECL UBYTE *argstring)
  66. {
  67.   BASE_EXT_DECL
  68.   register struct Library *a6 __asm("a6") = BASE_NAME;
  69.   register UBYTE *a0 __asm("a0") = argstring;
  70.   __asm __volatile ("jsr a6@(-0x84)"
  71.   : /* no output */
  72.   : "r" (a6), "r" (a0)
  73.   : "a0","a1","d0","d1", "memory");
  74. }
  75. extern __inline void 
  76. DeleteRexxMsg (BASE_PAR_DECL struct RexxMsg *packet)
  77. {
  78.   BASE_EXT_DECL
  79.   register struct Library *a6 __asm("a6") = BASE_NAME;
  80.   register struct RexxMsg *a0 __asm("a0") = packet;
  81.   __asm __volatile ("jsr a6@(-0x96)"
  82.   : /* no output */
  83.   : "r" (a6), "r" (a0)
  84.   : "a0","a1","d0","d1", "memory");
  85. }
  86. extern __inline BOOL 
  87. FillRexxMsg (BASE_PAR_DECL struct RexxMsg *msgptr,unsigned long count,unsigned long mask)
  88. {
  89.   BASE_EXT_DECL
  90.   register BOOL  _res  __asm("d0");
  91.   register struct Library *a6 __asm("a6") = BASE_NAME;
  92.   register struct RexxMsg *a0 __asm("a0") = msgptr;
  93.   register unsigned long d0 __asm("d0") = count;
  94.   register unsigned long d1 __asm("d1") = mask;
  95.   __asm __volatile ("jsr a6@(-0xa2)"
  96.   : "=r" (_res)
  97.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  98.   : "a0","a1","d0","d1", "memory");
  99.   return _res;
  100. }
  101. extern __inline BOOL 
  102. IsRexxMsg (BASE_PAR_DECL struct RexxMsg *msgptr)
  103. {
  104.   BASE_EXT_DECL
  105.   register BOOL  _res  __asm("d0");
  106.   register struct Library *a6 __asm("a6") = BASE_NAME;
  107.   register struct RexxMsg *a0 __asm("a0") = msgptr;
  108.   __asm __volatile ("jsr a6@(-0xa8)"
  109.   : "=r" (_res)
  110.   : "r" (a6), "r" (a0)
  111.   : "a0","a1","d0","d1", "memory");
  112.   return _res;
  113. }
  114. extern __inline ULONG 
  115. LengthArgstring (BASE_PAR_DECL UBYTE *argstring)
  116. {
  117.   BASE_EXT_DECL
  118.   register ULONG  _res  __asm("d0");
  119.   register struct Library *a6 __asm("a6") = BASE_NAME;
  120.   register UBYTE *a0 __asm("a0") = argstring;
  121.   __asm __volatile ("jsr a6@(-0x8a)"
  122.   : "=r" (_res)
  123.   : "r" (a6), "r" (a0)
  124.   : "a0","a1","d0","d1", "memory");
  125.   return _res;
  126. }
  127. extern __inline void 
  128. LockRexxBase (BASE_PAR_DECL unsigned long resource)
  129. {
  130.   BASE_EXT_DECL
  131.   register struct Library *a6 __asm("a6") = BASE_NAME;
  132.   register unsigned long d0 __asm("d0") = resource;
  133.   __asm __volatile ("jsr a6@(-0x1c2)"
  134.   : /* no output */
  135.   : "r" (a6), "r" (d0)
  136.   : "a0","a1","d0","d1", "memory");
  137. }
  138. extern __inline void 
  139. UnlockRexxBase (BASE_PAR_DECL unsigned long resource)
  140. {
  141.   BASE_EXT_DECL
  142.   register struct Library *a6 __asm("a6") = BASE_NAME;
  143.   register unsigned long d0 __asm("d0") = resource;
  144.   __asm __volatile ("jsr a6@(-0x1c8)"
  145.   : /* no output */
  146.   : "r" (a6), "r" (d0)
  147.   : "a0","a1","d0","d1", "memory");
  148. }
  149.  
  150. #undef BASE_EXT_DECL
  151. #undef BASE_EXT_DECL0
  152. #undef BASE_PAR_DECL
  153. #undef BASE_PAR_DECL0
  154. #undef BASE_NAME
  155.  
  156. __END_DECLS
  157.  
  158. #endif /* _INLINE_REXXSYSLIB_H */
  159.